json
A JSON (JavaScript Object Notation) datatype.
JSON values are created from text and support conversion to GTV via gtv.from_json(). They can be stored in the database as an entity attribute.
JSON values in Rell are represented internally with text, which has been validated as legal JSON.
Since
0.6.0
See also
Constructors
Functions
Convert this JSON value to a big_integer.
All JSON values that can be converted to integer with as_integer() can also be converted to big_integer with as_big_integer(), though the reverse is not true, since big_integer values may fall outside the integer range.
Convert this JSON value to a big_integer.
All JSON values that can be converted to integer with as_integer_or_null() can also be converted to big_integer with as_big_integer_or_null(), though the reverse is not true, since big_integer values may fall outside the integer range.
Convert this JSON boolean value to a boolean.
Convert this JSON boolean value to a boolean.
Convert this JSON integer value to an integer.
All JSON values that can be converted to integer with as_integer() can also be converted to big_integer with as_big_integer(), though the reverse is not true, since big_integer values may fall outside the integer range.
Convert this JSON integer value to an integer.
All JSON values that can be converted to integer with as_integer_or_null() can also be converted to big_integer with as_big_integer_or_null(), though the reverse is not true, since big_integer values may fall outside the integer range.
Convert this JSON text value to text.
Note that this method is different to json.to_text(). This method retrieves this text-typed JSON value as Rell text, and throws an exception if this JSON value is not of text type. json.to_text() converts this entire JSON value to its text representation, regardless of what type of JSON value this is, and does not throw an exception.
Convert this JSON text value to text.
Get the element at the specified index of this JSON array.
json_array.get(index) is equivalent to json_array[index].
Get the member with the specified key in this JSON object.
json_object.get(key) is equivalent to json_object[key].
Get the element at the specified index of this JSON array, or null if this JSON value is not an array, or if the specified index is out of bounds.
Get the member with the specified key in this JSON object, or null if this JSON value is not an object, or if the specified key is not found in this object.
Determine whether this JSON value can be converted to big_integer.
All JSON values that return true with is_integer() also return true with is_big_integer(), though the reverse is not the case, since big_integer values may fall outside the integer range.
Determine whether this JSON value is a boolean.
Determine whether this JSON value is an integer.
All JSON values that return true with is_integer() also return true with is_big_integer(), though the reverse is not the case, since big_integer values may fall outside the integer range.
Convert this JSON value to text.
Note that this method is different to json.as_text(). This method converts this entire JSON value to its text representation, regardless of what type of JSON value this is, and does not throw an exception. json.as_text() retrieves this text-typed JSON value as Rell text, and throws an exception if this JSON value is not of text type.
Convert this JSON value to text.
Note that this method is different to json.as_text(). This method converts this entire JSON value to its text representation, regardless of what type of JSON value this is, and does not throw an exception. json.as_text() retrieves this text-typed JSON value as Rell text, and throws an exception if this JSON value is not of text type.